﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HF.Framework.DataClientDBAgent;
using HF.Business.Sale;//封装销售业务的类

public partial class SelectCustomer : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    private void bind()
    {
        if (rbtCode.Checked)
        {
            DataTable dt = Customers.GetCustomerTableLikeId(tbxSearch.Text);
            gvCustomer.DataSource = dt;
            gvCustomer.DataBind();
        }
        else
        {
            DataTable dt = Customers.GetCustomerTableLikeName(tbxSearch.Text);
            gvCustomer.DataSource = dt;
            gvCustomer.DataBind();
        }
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        bind();
    }
}
